FROM debian:13.1-slim
LABEL author=xiaoyilin
LABEL email=406735078@qq.com
ENV TZ=Asia/Shanghai
ARG GO_VERSION
ADD  go$GO_VERSION.linux-amd64.tar.gz /usr/local/
ENV GO_VERSION=${GO_VERSION}
# Go的安装目录
ENV GOROOT=/usr/local/go
ENV PATH=$PATH:$GOROOT/bin
CMD ["go","version"]

# https://go.dev/dl/
# docker build --build-arg GO_VERSION=1.25.4 -t registry.cn-hangzhou.aliyuncs.com/xiaoyilin/go:1.25.4-d131slim .
# docker build --build-arg GO_VERSION=1.24.10 -t registry.cn-hangzhou.aliyuncs.com/xiaoyilin/go:1.24.10-d131slim .
# docker build --build-arg GO_VERSION=1.23.12 -t registry.cn-hangzhou.aliyuncs.com/xiaoyilin/go:1.23.12-d131slim .
# docker build --build-arg GO_VERSION=1.22.12 -t registry.cn-hangzhou.aliyuncs.com/xiaoyilin/go:1.22.12-d131slim .
# docker build --build-arg GO_VERSION=1.21.13 -t registry.cn-hangzhou.aliyuncs.com/xiaoyilin/go:1.21.13-d131slim .
# docker build --build-arg GO_VERSION=1.20.14 -t registry.cn-hangzhou.aliyuncs.com/xiaoyilin/go:1.20.14-d131slim .
# docker build --build-arg GO_VERSION=1.19.13 -t registry.cn-hangzhou.aliyuncs.com/xiaoyilin/go:1.19.13-d131slim .
# docker push registry.cn-hangzhou.aliyuncs.com/xiaoyilin/go:1.23.12-d131slim
# docker run --rm registry.cn-hangzhou.aliyuncs.com/xiaoyilin/go:1.23.12-d131slim
# docker run --rm -it registry.cn-hangzhou.aliyuncs.com/xiaoyilin/go:1.23.12-d131slim bash